<!DOCTYPE html>
	<html>
		<head>
	    	<meta charset="utf-8" />
	    	<title> ajouter une annonce </title>
	    	<link rel="stylesheet" type="text/css"  media="screen" href="topic.css"/>
    	</head>
   <body>
	    <?php  
			if($_SESSION['log'] == 1){
			include_once("header_connecter.html");
			}else{
			include_once("header_deconnecter.html");
			} 
		?>
			<br/>
		    <br/>
		    <br/>
		<center>
			<h2>  Ajouter votre annonce </h2>
				<table name="table2" id="table2" align="center" border="1">
					<form method="post" id="formUpload" method="post" action="ajout_bien.php" ENCTYPE="multipart/form-data">	
						<tr>
							<td> Pays
							</td>
							<td>
					  			<select name="pays" id="pays">
									<?php  while($val1=mysqli_fetch_array($Pays)){
				 					echo "<option value='".$val1['id']."'>".utf8_encode($val1['pays'])."</option>";} ?>
								</select>
							</td>
				 		</tr>
						<tr>
							<td> Ville 
							</td>
							<td>
								<select name="villes" id="villes">
									<?php while($val3=mysqli_fetch_array($Villes)){
									echo"<option value='".$val3['id']."'>".utf8_encode($val3['ville'])."</option>";}?>
								</select>
							</td>
						</tr>
						<tr>
							<td> Adresse 
							</td>
							<td> <input type="text" id="adresse" name="adresse" /> </td>
						</tr>	 
						<tr>
							<td> Type de logement 
							</td>
							<td>
								<select name="types" id="types">
									<?php while($val2=mysqli_fetch_array($Types)){
									echo"<option value='".$val2['id']."'>".utf8_encode($val2['type'])."</option>";}?>
								</select>
							</td>
						</tr>
						<tr>
							<td> Code postal 
							</td>
							<td> <input type="text" id="code_postal" name="code_postal" /> </td>
						</tr>
						<tr>
							<td> Tarif par jour 
							</td>
							<td><input type="text" name="tarif_jour" id="tarif_jour" /> </td>
						</tr>
						<tr> 
							<td> Tarif par semaine 
							</td>
							<td> <input id="tarif_semaine" type="text" name="tarif_semaine" />  </td>
						</tr>
						<tr>
							<td> Surface
							</td>
							<td> <input type="text" name="surface" id="surface" /> </td>
						</tr>
						<tr>
							<td> Description 
							</td>
							<td> <input type="text" name="description"  id="description" /> </td>
						</tr>
						<tr>
				 			<td>
				 			<label for="image" title="Veuillez selectioner une image"> Votre image :</label>
				 			</td>
				 		</tr>
				 		<tr>
				 			<td> <input type="file" value="" id="img" name="img" title="Veuillez saisir votre image" required /> </td>
				 		</tr>
				 		<tr>
							<td> Debut de dispo
							</td>
							<td>
								<select name="jour1" id="jour1">
									<?php for($jour1=1;$jour1<=30;$jour1++)
									{
										echo "<option value=".$jour1.">".$jour1."</option>";
									}
								?>
								</select>
								<select name="mois1" id="mois1">
									<?php for($mois1 = 1; $mois1 <=12 ;$mois1++)
									{
										echo "<option value=".$mois1.">".$mois1."</option>";
									}
								?>
								</select>
								<select name="annee1" id="annee1">
									<?php for($annee1=2014;$annee1<=2050;$annee1++)
									{
										echo "<option value=".$annee1.">".$annee1."</option>";
									}
								?>
								</select>
							</td>
						</tr>
						<tr>
							<td> Fin de dispo
							</td>
							<td>
								<select name="jour2" id="jour2">
									<?php for($jour2=1;$jour2<=30;$jour2++)
									{
										echo "<option value=".$jour2.">".$jour2."</option>";
									}
								?>
								</select>
								<select name="mois2" id="mois2">
									<?php for($mois2 = 1; $mois2 <=12 ;$mois2  ++)
									{
									echo"<option value'".$mois2."'>".$mois2."</option>";
									}
								?>
								</select>
								<select name="annee2" id="annee2">
									<?php for($annee2 = 2014; $annee2 <=2050 ;$annee2  ++)
									{
									echo"<option value'".$annee2."'>".$annee2."</option>";
									}
								?>
								</select>
							</td>
						</tr>
						<tr>
							<td colspan="2" align="center"> <input type="submit" name="envoyer" value="Envoyer" id="envoyer" /> </td>
						</tr>
					</form>
				</table>
		</center>
	</body>
</html>
			